-- CALC_CRYSTAL_BALL_BONUS

-- 计算水晶球的奖励
-- @param user  玩家对象
return function(user)
    local ret = {};
    
    -- 50%概率攻击+2、50%概率魔力+2
    local ratio = DungeonM.getRandSeed("CALC_CRYSTAL_BALL_BONUS") % 100;
    if ratio < 50 then 
        ret["bonus"] = {{2, "attack", 2}};
    else
        ret["bonus"] = {{2, "magic", 2}};
    end

    return ret;
    
end